package com.adcc.loadsheet.monitor.util;

import com.adcc.aoc.devLib.traffic.base.udp.UDPServer;
import com.adcc.aoc.devLib.traffic.base.udp.UDPTrafficMode;


public abstract class BaseUDPFactory {

    // 本地host地址
    public String localHost = "127.0.0.1";

    // 远程host地址
    public String remoteHost = "127.0.0.1";

    // 端口
    public int port = 8088;

    // UDP传输模式
    public UDPTrafficMode trafficMode = UDPTrafficMode.UNICAST;

    // 读空闲(unit:s)
    public int readerIdle;

    // UDP服务端
    public UDPServer server;

    public BaseUDPFactory(){

    }

    public String getLocalHost() {
        return localHost;
    }

    public void setLocalHost(String localHost) {
        this.localHost = localHost;
    }

    public String getRemoteHost() {
        return remoteHost;
    }

    public void setRemoteHost(String remoteHost) {
        this.remoteHost = remoteHost;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public UDPTrafficMode getTrafficMode() {
        return trafficMode;
    }

    public void setTrafficMode(UDPTrafficMode trafficMode) {
        this.trafficMode = trafficMode;
    }

    public int getReaderIdle() {
        return readerIdle;
    }

    public void setReaderIdle(int readerIdle) {
        this.readerIdle = readerIdle;
    }

    public abstract void start();

    public abstract void stop();

    public abstract void restart();



}
